<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<table class="display" id="example">
	<thead>
		<tr>
			<th>选择</th>
			<th>姓名</th>
			<th>面试岗位</th>
			<th>需求单位</th>
			<th>面试时间</th>
			<th>初试</th>
			<th>复试</th>
			<th>状态</th>
		</tr>
	</thead>
	<tbody>
		<s:if
			test="#request.interviewArrangePOJOs==null || #request.interviewArrangePOJOs.size() <= 0">
			<tr class="gradeA">
				<td colspan="8">暂无招聘数据</td>
			</tr>
		</s:if>
		<s:else>
			<s:iterator value="#request.interviewArrangePOJOs" var="interview"
				status="sta">
				<s:if test="#sta.even">
					<tr class="gradeA">
				</s:if>
				<s:else>
					<tr class="gradeC">
				</s:else>

				<td><input type="checkbox" name="chk_interview_arrange"
					value="${interview.id}" /></td>
				<td>${interview.name}</td>
				<td>${interview.dutyName}</td>
				<td>${interview.organization.path}</td>
				<td><s:if test="#interview.interviewTime == null">还未开始</s:if>
					<s:else>
						<fmt:formatDate value="${interview.interviewTime}"
							pattern="yyyy-MM-dd"></fmt:formatDate>
					</s:else></td>
				<td><s:if test="#interview.firstView == null">
						<a
							href="#invite/interview_arrange.xhtml?i=${interview.id}&e=${interview.employeeId}&t=fv&dutyId=${interview.dutyId}&organizationId=${interview.orgId}"
							value="Simple Popover" class="button"><span class="icon"
							style="background:url(${ctx}/images/img/user_comment.png)">&nbsp;</span>立即面试</a>
					</s:if> <s:else>
						<a href="javascript:void(0)" value="Simple Popover" class="button">
							<s:if test="#interview.firstView.toString() == 'pass'">
								<span class="icon"
									style="background:url(${ctx}/images/img/accept.png)">&nbsp;</span>
							</s:if> <s:else>
								<span class="icon"
									style="background:url(${ctx}/images/img/exclamation.png)">&nbsp;</span>
							</s:else> ${interview.firstView.name}
						</a>
					</s:else></td>
				<td><s:if test="#interview.repeatView == null && #interview.firstView != null && #interview.firstView.toString() == 'pass'">
						<a
							href="#invite/interview_arrange.xhtml?i=${interview.id}&e=${interview.employeeId}&t=rv&dutyId=${interview.dutyId}&organizationId=${interview.orgId}"
							value="Simple Popover" class="button"><span class="icon"
							style="background:url(${ctx}/images/img/user_comment.png)">&nbsp;</span>立即面试</a>
					</s:if> <s:elseif test="#interview.repeatView != null">
						<a href="javascript:void(0)" value="Simple Popover" class="button">
							<s:if test="#interview.repeatView.toString() == 'pass'">
								<span class="icon"
									style="background:url(${ctx}/images/img/accept.png)">&nbsp;</span>
							</s:if> <s:else>
								<span class="icon"
									style="background:url(${ctx}/images/img/exclamation.png)">&nbsp;</span>
							</s:else> ${interview.repeatView.name}
						</a>
					</s:elseif></td>
				<td><s:if test="#interview.viewStatus == null">
						<a href="javascript:void(0)" value="Simple Popover" class="button"><span
							class="icon" style="background:url(${ctx}/images/img/help.png)">&nbsp;</span>未进行</a>
					</s:if> <s:else>
						<a href="javascript:void(0)" value="Simple Popover" class="button">
							<s:if test="#interview.viewStatus.toString() == 'viewing'">
								<span class="icon"
									style="background:url(${ctx}/images/img/help.png)">&nbsp;</span>
							</s:if> <s:elseif test="#interview.viewStatus.toString().equals('out')">
								<span class="icon"
									style="background:url(${ctx}/images/img/delete.png)">&nbsp;</span>
							</s:elseif> <s:else>
								<span class="icon"
									style="background:url(${ctx}/images/img/accept.png)">&nbsp;</span>
							</s:else> ${interview.viewStatus.name}
						</a>
					</s:else></td>
				</tr>
			</s:iterator>
		</s:else>
	</tbody>
</table>

<p>
	<%@ include file="/WEB-INF/pages/common/main_orgtab_pager.jsp"%>
</p>